package com.javasm.adminapi.module.product.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.javasm.adminapi.module.product.entity.TCategory;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 商品类型（类目）表(TCategory)表数据库访问层
 *
 * @author makejava
 * @since 2025-10-14 22:29:06
 */
public interface TCategoryDao extends BaseMapper<TCategory> {

    @Select("SELECT \n" +
            "    b.cate_id,\n" +
            "    b.brand_desc,\n" +
            "    c.*\n" +
            "FROM \n" +
            "    t_brand b\n" +
            "JOIN \n" +
            "    t_category c ON b.cate_id = c.id;")
    List<TCategory> queryCategoryByTBarnd();
}

